// 1.整体是一个自动执行函数
(function () {
    // 2.定义一个__webpack_modules__,key是路径的地址,value是一个函数
    var __webpack_modules__ = {
        // commonJS的方式
        "./src/js/format.js": function (module) {
            const dateFormate = date => {
                return "2021-12-12";
            };

            const priceFormate = price => {
                return "100.00";
            };
            module.exports = {
                dateFormate,
                priceFormate
            };
        },
        // commonJS的方式
        "./src/js/format2.js": function (module) {
            const dateFormate2 = date => {
                return "2021-12-12";
            };

            const priceFormate2 = price => {
                return "100.00";
            };
            module.exports = {
                dateFormate2,
                priceFormate2
            };
        },
        // ESmodule的方式
        "./src/js/math.js": function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
            "use strict";
            __webpack_require__.r(__webpack_exports__);
            __webpack_require__.d(__webpack_exports__, {
                mul: function () {
                    return mul;
                },
                sum: function () {
                    return sum;
                }
            });
            const sum = (num1, num2) => {
                return num1 + num2;
            };

            const mul = (num1, num2) => {
                return num1 * num2;
            };
        }
    };
    // 定义一个缓存内容
    var __webpack_module_cache__ = {};
    // function会形成自己的作用域
    function __webpack_require__(moduleId) {
        // 查看是否有缓存,有缓存直接返回
        var cachedModule = __webpack_module_cache__[moduleId];
        if (cachedModule !== undefined) {
            return cachedModule.exports;
        }
        // 没有缓存的时候,定义一个module，内置一个exports的地址，是函数内的有作用域的地方
        var module = (__webpack_module_cache__[moduleId] = {
            exports: {}
        });
        // 拿到对应的函数,并且传入module
        __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
        return module.exports;
    }
    // 自动执行函数
    !(function () {
        __webpack_require__.d = function (exports, definition) {
            for (var key in definition) {
                if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
                    Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
                }
            }
        };
    })();
    !(function () {
        __webpack_require__.o = function (obj, prop) {
            return Object.prototype.hasOwnProperty.call(obj, prop);
        };
    })();
    !(function () {
        __webpack_require__.r = function (exports) {
            if (typeof Symbol !== "undefined" && Symbol.toStringTag) {
                Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
            }
            Object.defineProperty(exports, "__esModule", { value: true });
        };
    })();
    var __webpack_exports__ = {};
    !(function () {
        "use strict";
        __webpack_require__.r(__webpack_exports__);
        var _js_math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("./src/js/math.js");
        const { dateFormate, priceFormate } = __webpack_require__("./src/js/format.js");
        const { dateFormate2, priceFormate2 } = __webpack_require__("./src/js/format2.js");
        console.log(dateFormate("abc"));
        console.log(priceFormate("abc"));
        console.log(dateFormate2("abc"));
        console.log(priceFormate2("abc"));

        console.log((0, _js_math_js__WEBPACK_IMPORTED_MODULE_0__.sum)(1, 2));
        console.log((0, _js_math_js__WEBPACK_IMPORTED_MODULE_0__.mul)(2, 3));
    })();
})();
